<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div class="pageContent">
	<form method="post" action="ExamMain/rgAdd"
		class="pageForm required-validate"
		onsubmit="return validateCallback(this, navTabAjaxDone);">
		<div class="pageFormContent" layoutH="56">
			<!-- header content -->
			<table class="pageFormContent">
				<tr>
					<td>试卷名称:</td>
					<td><input type="text" name="title" maxlength="50"
						class="required" /></td>
					<td>试卷总分:</td>
					<td><input type="text" name="exscore" class="required" /></td>
					<td>备注信息</td>
					<td><input type="text" name="remark" /></td>
				</tr>
			</table>
			<!-- start -->
			<div class="panelBar">
				<ul class="toolBar">
					<li class="line">line</li>
					<li><a class="edit" href="ExamMain/plist" target="dialog" 
						width="800" height="450" fresh="true" mask="true" rel="newPage" 
						title="添加试题"><span>添加试题 </span></a></li>
					<li class="line">line</li>
					<!-- 
					<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids"
						postType="string" class="add" href="ExamMain/rgAdd"
						target="navTab" mask="true" rel="newPage" title="添加选择题信息"><span>组卷

						</span></a></li>
					<li class="line">line</li>
					 -->
				</ul>
			</div>
			<table id="addTable" width="100%" layoutH="130" class="list" >
				<thead>
					<tr>
						<th width="26"><input type="hidden" group="ids"
							class="checkboxCtrl"> 序号</th>
						<th>试题内容</th>
						<th>科目名称</th>
						<th>岗位信息</th>
						<th>难度系数</th>
						<th>类型</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				
				</tbody>
			</table>
			<!-- end  -->
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">保存</button>
						</div>
					</div></li>
				<li>
					<div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	</form>
</div>
<script type="text/javascript">
<!--
	function addTable() {
		var otable = document.getElementById("addTable");
		var rtnValue = window.returnValue;
		for ( var i = 0; i < rtnValue.length; i++) {
			temp = rtnValue[i].split("#");
			var myTR = otable.insertRow(otable.rows.length);
			myTR.setAttribute('target','sid_shiti');
			myTR.setAttribute('rel',temp[0]);
			var myTD1 = myTR.insertCell(0);
			myTD1.innerHTML = "<b>"+temp[0]+"</b><input type='hidden' name='ids' value="+temp[0]+"#"+temp[5]+">";
			var myTD2 = myTR.insertCell(1);
			myTD2.innerHTML =  temp[1] ;
			var myTD3 = myTR.insertCell(2);
			myTD3.innerHTML = temp[2];
			var myTD4 = myTR.insertCell(3);
			myTD4.innerHTML = temp[3] ;
			var myTD5 = myTR.insertCell(4);
			myTD5.innerHTML = temp[4] ;
			var myTD5 = myTR.insertCell(5);
			myTD5.innerHTML = temp[5];
			var myTD6=myTR.insertCell(6);
			myTD6.innerHTML="<a  title='删选试卷信息' name='delete' href='javascript:;' onclick='_deleteRow(this)' class='btnDel'>删除 试题</a>";
		}
	}
	//$("#addTable").removeClass("list").addClass("table");
	function _deleteRow(rowID){
	    var i=rowID.parentNode.parentNode.rowIndex;
		var otable=document.getElementById("addTable");
		otable.deleteRow(parseInt(i));
	}
//-->
</script>
